package com.woniu.service.mallSystem;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.woniu.model.mallSystem.dto.CommodityESDto;
import com.woniu.model.mallSystem.dto.CommodityQueryDto;
import com.woniu.model.mallSystem.entity.Commodity;
import com.woniu.model.mallSystem.vo.CommodityVo;
import com.woniu.model.mallSystem.vo.PageVo;


import java.util.Map;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author Lzj
 * @since 2023-10-19
 */
public interface ICommodityService extends IService<Commodity> {

    /**
     * 动态条件搜索
     */
    PageInfo<CommodityVo> findAllCommodities(int pageNum, int pageSize, Map<String, Object> condition);

    /**
     *高级筛选
     */
    PageVo<Commodity> conditionQuery(Integer pageNum, Integer pageSize, CommodityQueryDto commodityQueryDto);

    /**
     *es高亮搜索
     */
    Map<String, Object> search(String keyword, Integer pageNum, Integer pageSize);

    PageInfo<CommodityVo> advancedQuery(int pageNum, int pageSize, Map<String, Object> advanceCondition);

    PageInfo<CommodityVo> listByElasticSearch(int pageNum, int pageSize, CommodityESDto commodityESDto);
}
